<?php

namespace backend\assets;

use common\components\GlobalUrlComponent;
use yii\web\AssetBundle;

/**
 * Main admin application asset bundle.
 */
class AppAsset extends AssetBundle
{
    public function __construct(array $config = [])
    {
        $this->css = $this->css + [
                1=>GlobalUrlComponent::buildStaticUrl('/plugins/bower_components/bootstrap-extension/css/bootstrap-extension.css'),
                2=>GlobalUrlComponent::buildStaticUrl('/plugins/bower_components/sidebar-nav/dist/sidebar-nav.min.css'),
                5=>GlobalUrlComponent::buildStaticUrl('/plugins/bower_components/custom-select/custom-select.css'),
                6=>GlobalUrlComponent::buildStaticUrl('/plugins/bower_components/bootstrap-select/bootstrap-select.min.css'),
                8=>GlobalUrlComponent::buildStaticUrl('/plugins/bower_components/switchery/dist/switchery.min.css')
        ];
        ksort($this->css);

        $this->js = [
                0=>GlobalUrlComponent::buildStaticUrl('/plugins/bower_components/jquery/dist/jquery.min.js'),
                3=>GlobalUrlComponent::buildStaticUrl('/plugins/bower_components/bootstrap-extension/js/bootstrap-extension.min.js'),
                4=>GlobalUrlComponent::buildStaticUrl('/plugins/bower_components/sidebar-nav/dist/sidebar-nav.min.js'),
                8=>GlobalUrlComponent::buildStaticUrl('/plugins/bower_components/styleswitcher/jQuery.style.switcher.js'),
                9=>GlobalUrlComponent::buildStaticUrl('/plugins/bower_components/bootstrap-select/bootstrap-select.min.js'),
                10=>GlobalUrlComponent::buildStaticUrl('/plugins/bower_components/custom-select/custom-select.min.js'),
                11=>GlobalUrlComponent::buildStaticUrl('/plugins/bower_components/switchery/dist/switchery.min.js'),
                12=>GlobalUrlComponent::buildStaticUrl('/plugins/bower_components/switchery/switchery.init.js'),
                13=>GlobalUrlComponent::buildStaticUrl('/js/comm.js?v=2'),
        ] + $this->js;

        ksort($this->js);

        parent::__construct($config);
    }

    public $basePath = '@webroot';
    public $baseUrl = '@web';
    public $css = [
        0=>'/static/bootstrap/dist/css/bootstrap.min.css',
        3=>'/static/css/animate.css',
        4=>'/static/css/style.css',
        9=>'/static/css/common.css',
//        '/static/css/colors/default.css',
       //这里的样式放到main里去 因为link标签需要id  5=>'static/css/colors/blue.css'
    ];
    public $js = [
        1=>'/static/bootstrap/dist/js/tether.min.js',
        2=>'/static/bootstrap/dist/js/bootstrap.min.js',
        5=>'/static/js/jquery.slimscroll.js',
        6=>'/static/js/waves.js',
        7=>'/static/js/custom.min.js',
        14=>'/static/js/validate_jquery.js',
    ];
    public $depends = [
    ];
}
